build(test-potel-aws-lambda): Migrate from pip to uv#58
Conversation
Replace lambda_function/requirements.txt with pyproject.toml and update deploy.sh to use uv pip install for Lambda packaging. Refs PY-2485 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 541594f. Configure here.
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
| uv pip install --system --no-cache -r $TEMP_DIR/pyproject.toml --target $TEMP_DIR/ |
There was a problem hiding this comment.
uv missing from PATH after install
Medium Severity
When uv is not already on PATH, deploy.sh runs the Astral installer and immediately calls uv pip install. The installer puts uv under ~/.local/bin and only updates future shells, so the same script can exit with “command not found” and never build the Lambda zip.
Reviewed by Cursor Bugbot for commit 541594f. Configure here.
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
| uv pip install --system --no-cache -r $TEMP_DIR/pyproject.toml --target $TEMP_DIR/ |
There was a problem hiding this comment.
Bug: The script installs uv but doesn't update the current shell's PATH. The subsequent uv pip install command will fail, aborting the deployment due to set -e.
Severity: CRITICAL
Suggested Fix
After the uv installation line, add source "$HOME/.local/bin/env" or export PATH="$HOME/.local/bin:$PATH" to update the PATH for the current shell session. This will ensure the uv command is found in the subsequent step.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: test-potel-aws-lambda/deploy.sh#L58-L61
Potential issue: The `deploy.sh` script attempts to install `uv` if it's not found using
the official installer. However, this installer only updates shell configuration files
for future sessions and does not modify the `PATH` of the current, running shell. The
script immediately proceeds to call `uv pip install ...` in the same session. Because
the `uv` binary's location (`~/.local/bin`) is not yet in the `PATH`, the command will
fail with a "command not found" error. Since `set -e` is active, this failure will cause
the entire deployment script to abort on any machine that does not already have `uv`
installed.
Did we get this right? 👍 / 👎 to inform future reviews.


Summary
lambda_function/requirements.txtwithlambda_function/pyproject.tomldeploy.shto useuv pip installinstead of pip for Lambda packagingTest plan
./deploy.shand verify the Lambda function deploys correctly🤖 Generated with Claude Code